package com.imooc.jms.producer;

import com.imooc.jms.producer.impl.QueueProducerServiceImpl;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class QueueProducer {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("producer.xml");
        ProducerService service = context.getBean(QueueProducerServiceImpl.class);

        for (int i=0;i <50;i ++) {
            service.sendMessage("test-msg-" + i);
        }

        context.close();
    }
}
